import request from '@/utils/request'

// 获取用户信息
export function getUser() {
  return request({
    url: '/userinfo/info',
  })
}

// 获取我的收藏
export function getCollect(params) {
  return request({
    url: '/collect/list',
    params
  })
}

// 常见
export function getQA() {
  return request({
    url: '/faq/list',
  })
}
// 获取客服二维码
export function getConsultant() {
  return request({
    url: '/wechat/setting/consultant',
  })
}

// 获取推广二维码
export function getGeneralize() {
  return request({
    url: '/wechat/setting/generalize/image',
  })
}

// 获取默认报名的班级信息
export function getPower(params) {
  return request({
    url: '/today/semester/default',
    params
  })
}
// 获取默认报名的班级信息
export function getIsPower(semester) {
  return request({
    url: `/today/isBuy/semester/${semester}`,
  })
}

// 获取推送信息
export function getPushInfo(id) {
  return request({
    url: `/publish/public/${id}`,
  })
}

// 获取可领取的优惠券
export function getCoupon() {
  return request({
    url: `/coupon/valid/info`,
  })
}

// 获取可领取的优惠券
export function getMyCoupon() {
  return request({
    url: `/coupon/list`,
  })
}

// 领取优惠券
export function fetchCoupon(id) {
  return request({
    url: `/coupon/get/coupon/${id}`,
  })
}
